package com.chenggcode.mpsamples.persistence.mapper;

import com.chenggcode.mpsamples.persistence.domain.JsonbEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
* @author chenggcode
* @description 针对表【tb_jsonb(包含jsonb字段的表)】的数据库操作Mapper
* @createDate 2025-07-03 11:42:57
* @Entity generator.domain.JsonbEntity
*/
public interface JsonbMapper extends BaseMapper<JsonbEntity> {


    @Update("UPDATE tb_jsonb SET json_info1 = #{jsonInfo1, typeHandler=com.chenggcode.mpsamples.persistence.domain" +
            ".handlers.JsonbJacksonTypeHandler}, col1 = #{col1} WHERE id = #{id}")
    int updateNullAndJsonb(@Param("id") Integer id,
                            @Param("jsonInfo1") Object jsonInfo1,
                            @Param("col1") Integer col1);

}




